/*
 * Copyright (c) 2006, 2023, webrx.cn All rights reserved.
 *
 */
package cn.reg;

/**
 * <p>Project: jse2302 - RegExp6
 * <p>Powered by webrx On 2023-06-20 17:09:35
 * <p>Created by IntelliJ IDEA
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class RegExp6 {
    public static void main(String[] args) {
        boolean f1 = "hello".matches("^\\d+$");
        System.out.println(f1);
        boolean f2 = "hello".matches("\\d+");
        System.out.println(f2);
        boolean f3 = "he6llo".matches(".*\\d+.*");
        System.out.println(f3);
        // . *{0,1} + ? {n} {m,n} + {1,} {n} -? + *
        boolean f4 = "asdfasfasd".matches(".+");
        System.out.println(f4);

        boolean f5 = "333333888888333333333335555".matches("[358]{3,}");
        System.out.println(f5);

        boolean f6 = "UDMINADMIN".matches("[A-Z][a-zA-Z]{5,9}");
        System.out.println(f6);

        //[^0-9]
        boolean f7 = "13015577033".matches("1[358][0-35-9]{9}");
        System.out.println(f7);
    }
}
